package com.wzy.facetextview.Utils;

import android.content.Context;

/**
 * 保存缓存数据
 *
 */
public class CacheSp extends BaseSharePreference {

    private static CacheSp mCacheSp;

    private Context mContext;

    private static final String SHARED_PREFS_FILE_NAME = "com.vivo.space_preferences_cache";

    private static final byte[] sLock = new byte[0];

    private CacheSp(Context context) {
        mContext = context;
        init(mContext, SHARED_PREFS_FILE_NAME);
    }

    public static CacheSp getInstance(Context context) {

        synchronized (sLock) {
            if (mCacheSp == null) {
                mCacheSp = new CacheSp(context);
            }
        }

        return mCacheSp;
    }
}
